@extends('admin::layouts.master')
@section('content')
    @component('components.tabs',['title' => "模板管理"])
        @slot('nav')
        @endslot
        @slot('body')
            <div class="row">
                @foreach ($templates as $template)
                    <div class="col-sm-3">
                        <div class="btn-info btn btn-block">{{$template['title']}}</div>
                        <div class="card-block">
                            <img src="{{$template['preview']}}" alt="" width="100%" height="100%">
                        </div>
                        @if (HDModule::config('article.config.template') == $template['name'])
                            <a href="/article/template/setdefaulttemplate/{{$template['name']}}"
                               class="btn btn-block btn-success">默认模板</a>
                        @else
                            <a href="/article/template/setdefaulttemplate/{{$template['name']}}"
                               class="btn btn-block btn-secondary">设置默认模板</a>
                        @endif
                    </div>
                @endforeach
            </div>
        @endslot
    @endcomponent
@endsection


